import { ApiProperty } from "@nestjs/swagger";
import { IsEmail, IsNotEmpty } from "class-validator";

export class UpdateUserDto {

    headPic: string;

    @IsNotEmpty({ message: '昵称不能为空' })
    @ApiProperty({ example: '张三' })
    nickName: string;
    
    @IsNotEmpty({ message: '邮箱不能为空' })
    @IsEmail({}, { message: '不是合法的邮箱格式' })
    @ApiProperty({ example: 'xxx@xx.com' })
    email: string;
    
    @IsNotEmpty({ message: '验证码不能为空' })
    @ApiProperty({ example: 'abc123' })
    captcha: string;
}
